from nextpy_org import styles
from nextpy_org.templates import template
import nextpy as xt

@template(route="Form", title="4Components", description="2")
def form() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/form.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Button", title="4Components", description="2")
def button() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/button.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Checkbox", title="4Components", description="2")
def checkbox() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/checkbox.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Editable", title="4Components", description="2")
def editable() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/editable.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Editor", title="4Components", description="2")
def editor() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/editor.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Input", title="4Components", description="2")
def input() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/input.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="NumberInput", title="4Components", description="2")
def numberinput() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/numberinput.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="PinInput", title="4Components", description="2")
def pininput() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/pininput.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Radio", title="4Components", description="2")
def radio() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/radio.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="RangeSlider", title="4Components", description="2")
def rangeslider() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/rangeslider.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Select", title="4Components", description="2")
def select() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/select.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Slider", title="4Components", description="2")
def slider() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/slider.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Switch", title="4Components", description="2")
def switch() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/switch.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="TextArea", title="4Components", description="2")
def textarea() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/textarea.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Debounce", title="4Components", description="2")
def debounce() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/forms/debounce.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)
